#include "DiPoint.h"
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>

//Setters
void DiPoint::setFrame(int imageId) {frame = imageId;}

void DiPoint::setLeft(int amount) {location.x = amount;}
void DiPoint::setTop(int amount) {location.y = amount;}
void DiPoint::setRight(int amount) {location.x = amount -image[frame]->w;}
void DiPoint::setBottom(int amount) {location.y = amount -image[frame]->h;}

void DiPoint::setCenterX(int amount) {location.x = amount -(image[frame]->w/2);}
void DiPoint::setCenterY(int amount) {location.y = amount -(image[frame]->h/2);}

void DiPoint::draw(SDL_Surface *screen)
{SDL_BlitSurface(image[frame], NULL, screen, &location);}

SDL_Surface* DiPoint::image[37] = 
{
	IMG_Load("images/background_bottom_0.png"), 
	IMG_Load("images/background_bottom_1.png"),
	IMG_Load("images/background_top.png"),

	IMG_Load("images/cloud_back.png"),
	IMG_Load("images/cloud_front.png"),

	IMG_Load("images/tree_0.png"),
	IMG_Load("images/tree_1.png"),

	IMG_Load("images/title.png"),
	IMG_Load("images/button.png"),
	IMG_Load("images/tutorial.png"),

	IMG_Load("images/dark_dimension_logo.png"),

	IMG_Load("images/ground_0_0.png"),
	IMG_Load("images/ground_1_0.png"),
	IMG_Load("images/ground_2_0.png"),
	IMG_Load("images/ground_damaged_0.png"),
	IMG_Load("images/ground_damaged_1.png"),
	IMG_Load("images/ground_damaged_2.png"),

	IMG_Load("images/crystal.png"),
	IMG_Load("images/magic_mana.png"),
	IMG_Load("images/shield.png"),
	IMG_Load("images/double_score.png"),
	IMG_Load("images/spikes.png"),

	IMG_Load("images/sound_yes.png"),
	IMG_Load("images/sound_no.png"),

	IMG_Load("images/darek_run_0.png"),
	IMG_Load("images/darek_run_1.png"),
	IMG_Load("images/darek_run_2.png"),
	IMG_Load("images/darek_run_3.png"),
	IMG_Load("images/darek_run_4.png"),
	IMG_Load("images/darek_run_5.png"),
	IMG_Load("images/darek_run_6.png"),
	IMG_Load("images/darek_run_7.png"),

	IMG_Load("images/darek_fall.png"),
	IMG_Load("images/darek_jump.png"),

	IMG_Load("images/shield_active_0.png"),
	IMG_Load("images/shield_active_1.png"),

	IMG_Load("images/air_jump_darek.png")
};
